/* 商品详情页面样式 */

.product-detail {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
}

/* 商品图库 */
.product-gallery {
    width: 50%;
}

.main-image-container {
    width: 100%;
    height: 400px;
    border: 1px solid #eee;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 15px;
}

.main-image-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.thumbnails {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.thumbnail {
    width: 80px;
    height: 80px;
    border: 1px solid #eee;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s;
}

.thumbnail:hover {
    border-color: #1890ff;
}

.thumbnail.active {
    border-color: #1890ff;
    box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 商品信息 */
.product-info {
    width: 50%;
}

.product-info h1 {
    font-size: 24px;
    margin: 0 0 15px 0;
    color: #333;
}

.meta-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    color: #666;
    font-size: 14px;
}

/* 价格区域 */
.price-section {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px dashed #eee;
}

.current-price {
    font-size: 18px;
    margin-bottom: 5px;
}

.current-price span {
    color: #f56c6c;
    font-size: 28px;
    font-weight: bold;
}

.original-price {
    color: #999;
    text-decoration: line-through;
    font-size: 14px;
}

/* 状态区域 */
.status-section {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.status-badge {
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
}

.status-badge.on_sale {
    color: #52c41a;
    background: #f6ffed;
    border: 1px solid #b7eb8f;
}

.status-badge.sold {
    color: #ff4d4f;
    background: #fff2f0;
    border: 1px solid #ffccc7;
}

.status-badge.off_shelf {
    color: #666;
    background: #f5f5f5;
    border: 1px solid #d9d9d9;
}

/* 库存区域 */
.stock-section {
    margin-bottom: 15px;
    color: #666;
}

.stock-section span {
    color: #333;
    font-weight: bold;
}

/* 卖家区域 */
.seller-section {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.seller-section a {
    color: #1890ff;
    text-decoration: none;
}

.seller-section a:hover {
    text-decoration: underline;
}

.rating {
    color: #faad14;
    font-size: 14px;
}

/* 数量控制 */
.quantity-control {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 20px;
}

.quantity-control button {
    width: 30px;
    height: 30px;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quantity-control button:hover {
    border-color: #1890ff;
    color: #1890ff;
}

.quantity-control input {
    width: 60px;
    height: 30px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-align: center;
}

/* 操作按钮 */
.actions {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
}

.actions button {
    padding: 12px 24px;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: #1890ff;
    color: white;
    border: 1px solid #1890ff;
}

.btn-primary:hover {
    background: #40a9ff;
}

.btn-buy {
    background: #f56c6c;
    color: white;
    border: 1px solid #f56c6c;
}

.btn-buy:hover {
    background: #ff7875;
}

/* 标签页 */
.product-tabs {
    border: 1px solid #eee;
    border-radius: 6px;
    overflow: hidden;
}

.tab-headers {
    display: flex;
    border-bottom: 1px solid #eee;
    background: #fafafa;
}

.tab-header {
    padding: 12px 20px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 16px;
    position: relative;
}

.tab-header:hover {
    color: #1890ff;
}

.tab-header.active {
    color: #1890ff;
    font-weight: bold;
}

.tab-header.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: #1890ff;
}

.tab-contents {
    padding: 20px;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* 错误状态 */
.error {
    color: #ff4d4f;
    text-align: center;
    padding: 20px;
}

.loading {
    text-align: center;
    padding: 20px;
    color: #999;
}